#!/bin/bash
echo "EBS type capacity(Gb)" >>aws_info.txt
aws ec2 describe-volumes --query 'Volumes[].[VolumeType,Size]' --output text|awk '{total[$1]+=$2} END{for (i in total) print i,total[i]}' >>aws_info.txt
#aws ec2 describe-volumes --query 'Volumes[].[VolumeType,Size]' --output text|awk '{++S[$1]} END {for (a in S) print a,S[a]}'
